/*  PrimeBlaster
    by Kjetil Eide 
    kjetile445@gmail.com

    This file is part of PrimeBlaster

    PrimeBlaster is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    PrimeBlaster is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with PrimeBlaster.  If not, see <http://www.gnu.org/licenses/>.
*/

package org.eide.spaceship;

import org.newdawn.slick.Image;
import org.newdawn.slick.geom.Vector2f;

public class Wall extends RigidBody {
	/* indexes of the coordinates outlining the body shape */
	public static final int[] X = new int[] {0, 2, 4, 6};
	public static final int[] Y = new int[] {1, 3, 5, 7};

	/* Walls are unmovable */
	private static final float DENSITY = Float.MAX_VALUE;   
	private static final float COEFF_OF_REST = 1f;
	
	private Image wallImage;
	
	public Wall(float x, float y, float width, float height, Image wallImage) {
		super(DENSITY, width, height, COEFF_OF_REST, 
			  new Vector2f(x,y),
			  new float[] {-width/2, -height/2,
				     		width/2, -height/2,
						    width/2, height/2,
						   -width/2, height/2});
		this.wallImage = wallImage;
	}
		
	@Override
	public Image getImage() {
		return wallImage;
	}
	
	public boolean isUnmovable() {
		return true;
	}
	
	public RigidBody updateState() {
		return null;
	}
}
